import { create } from 'zustand'
import { immer } from 'zustand/middleware/immer' // 引入中间件

type LoadState = {
  isLoading: boolean,
  setLoaded: (status: boolean) => void
}

export const useLoadStore = create<LoadState>()(immer((set) => ({
  isLoading: true,
  setLoaded: (status) => set((state) => { state.isLoading = status })
})))
